]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Avoid animating the same icon twice
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Fri, 7 Feb 2020 09:23:11 +0000 (17:23 +0800)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 7 Feb 2020 11:31:20 +0000 (11:31 +0000)
If the icon proper has opacity of zero then that's probably because a
clone of it is animating. So avoid animating the source actor too.

And if there's any other reason for the opacity being zero, still don't
animate it because we can't see it :)

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2167
js/ui/iconGrid.js

index 67691c7d50a6202898add543eedc8a0e28413911..19d019f4db5e2d334373ae8f3f69d82927060d3b 100644 (file)
@@ -195,7 +195,7 @@ function zoomOutActorAtPos(actor, x, y) {
 }
 
 function animateIconPosition(icon, box, flags, nChangedIcons) {
-    if (!icon.has_allocation() || icon.allocation.equal(box)) {
+    if (!icon.has_allocation() || icon.allocation.equal(box) || icon.opacity === 0) {
         icon.allocate(box, flags);
         return false;
     }